package com.online.studyonline.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.online.studyonline.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from users where username = #{username}")
    public User getuser(String username);

    @Update("update users set school = #{school} where username = #{username}")
    public void stroreCall(String school,String username);

    @Update("update users set phone_number = #{phone} where username = #{username}")
    public void updatePhone(String phone,String username);

    @Update("update users set password_hash = #{password} where username = #{username}")
    public void updatePassword(String password,String username);
}
